#!/bin/bash
ls liqiu > /tmp/error #很明显这是一个错误的命令
#捕获上一条命令的输出 (if 0 正常 else 错误)
#echo "捕获上一条命令的输出 (if 0 正常 else 错误):"$?
ls -l > /tmp/log
echo $?
for i in "$@"; do
    echo "参数:"$i
done
sleep 2
echo "done"
echo "shenhao"
exit 10